projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
636fed5
)
libxc: Fix Segmentation fault of xend
author
Keir Fraser
<keir.fraser@citrix.com>
Mon, 21 Jun 2010 08:55:12 +0000
(09:55 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Mon, 21 Jun 2010 08:55:12 +0000
(09:55 +0100)
If /proc/xen/privcmd cannot be opened,
start xend occurs Segmentation fault.
Add check to fix it.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
tools/libxc/xc_private.c
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_private.c
b/tools/libxc/xc_private.c
index 9761b98af4b1db0152bab2658f522cf073d043ee..13a990a58c156258604f34979b1e9167a8c7c557 100644
(file)
--- a/
tools/libxc/xc_private.c
+++ b/
tools/libxc/xc_private.c
@@
-82,8
+82,10
@@
const xc_error *xc_get_last_error(xc_interface *xch)
void xc_clear_last_error(xc_interface *xch)
{
- xch->last_error.code = XC_ERROR_NONE;
- xch->last_error.message[0] = '\0';
+ if (xch) {
+ xch->last_error.code = XC_ERROR_NONE;
+ xch->last_error.message[0] = '\0';
+ }
}
const char *xc_error_code_to_desc(int code)